﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BloomsburyBanHang;
using BloomsburyBanHang.DAO;
namespace CuoiKi
{
    public partial class index : System.Web.UI.Page
    {
        public string chuoiSP;
        public string chuoiCag;
        protected void Page_Load(object sender, EventArgs e)
        {
            chuoiSP = "";
            chuoiCag = "";
            List<THE_LOAI> DSTLoai = TheLoaiDAO.LayDSTheLoai();
            chuoiCag += "<a href='#' data-filter='*' class='active'>All</a>";
            for (int i = 0; i < DSTLoai.Count; i++)
            {
                chuoiCag += "<a href='#' data-filter='." + DSTLoai[i].MaTheLoai + "'>" + DSTLoai[i].TenTheLoai + "</a>";
            }
            List<SAN_PHAM> DSSPham = SanPhamDAO.laydsAllSanPham();
            for (int i = 0; i < DSSPham.Count; i++)
            {
                chuoiSP += "<li class='item " + DSSPham[i].MaTheLoai + "'>";
                chuoiSP += "         <span class='price'>" + DSSPham[i].Gia + " €</span>";
                chuoiSP += "         <a href='detail.aspx?MaSanPham=" + DSSPham[i].MaSanPham + " '><img src='" + DSSPham[i].HinhAnh + "'/></a>";
                chuoiSP += "     </li>";
            }

        }
    }
}